package com.yhcnet.blog.service;

import com.yhcnet.blog.dao.CommentMapper;
import com.yhcnet.blog.pojo.Comment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CommentService {

    @Autowired
    CommentMapper commentMapper;

    public synchronized boolean say(Comment comment){
        int say = commentMapper.say(comment);
        if(say > 0) return true;
        return false;
    }

    public List<Comment> gertC(int eid){
        return commentMapper.getC(eid);
    }
}
